#ifndef _BSP_MPU6050_H
#define _BSP_MPU6050_H

#include "struct_typedef.h"
#include "main.h"

#define ACCEL_X_H  0X3B
#define ACCEL_X_L  0X3C
#define ACCEL_Y_H  0X3D
#define ACCEL_Y_L  0X3E
#define ACCEL_Z_H  0X3F
#define ACCEL_Z_L  0X40
#define TEMP_H     0X41
#define TEMP_L     0X42
#define GYRO_X_H   0X43
#define GYRO_X_L   0X44
#define GYRO_Y_H   0X45
#define GYRO_Y_L   0X46
#define GYRO_Z_H   0X47
#define GYRO_Z_L   0X48
#define MPU6050_ADDR  0X68
#define PWR_MGMT  0X6B

typedef struct
{
	fp32 accel_x_data;
	fp32 accel_y_data;
	fp32 accel_z_data;
	fp32 gyro_x_data;
	fp32 gyro_y_data;
	fp32 gyro_z_data;
	fp32 temp_data;
	
}mpu6050_data_t;

extern void mpu6050_Init(void);
extern void mpu6050_read_accel(void);
extern void mpu6050_read_gyro(void);
extern void mpu6050_read_temp(void);


#endif

